using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using CrystalDecisions.Web;
using System.Collections.Generic;
using Mani.Common;

public partial class Reports_InvoiceReport : System.Web.UI.Page {
    private CrystalReportManager manager;


    protected void Page_Init( object sender, EventArgs e ) {
        List<string> names = new List<string>();
        List<object> values = new List<object>();
        for (int i = 0; i < Request.QueryString.Count; i++) {
            values.Add( Request.QueryString[i] );
            names.Add( Request.QueryString.GetKey( i ) );
        }

        string connInfo = ConfigurationManager.ConnectionStrings[0].ConnectionString;
        manager = new CrystalReportManager( "Invoice", names, values );
        manager.Init( connInfo );
        crvInvoice.ReportSource = manager.Report;
        crvInvoice.DataBind();
    }

    protected void Page_Unload( object sender, EventArgs e ) {
        crvInvoice.Dispose();
        manager.Dispose();
    }
}
